package com.myk.game.gobangchess.rooms.absrooms.movechess;

import com.myk.game.gobangchess.Room;
import com.myk.game.gobangchess.Sign;

import java.util.List;

/**
 * 走子棋，房间的接口
 */
public interface MovedChessRoom {
    List<MovedChess> getChessList();
    MovedChess getSelectedChess();
    int[][] getCurGrids();
    List<Sign> getSignList();
    int getIndex(int row, int col);
    int[] getPositionByIndex(int index);
    MovedChess getChessByPos(int row, int col);
    MovedChess getChessByIndex(int index);
    default void render() {
        MovedChess selectedChess = getSelectedChess();
        for (MovedChess chess : getChessList()) {
            chess.render(this, selectedChess == chess);
        }
    }
}
